import * as monaco from 'monaco-editor'

export const createTypes = async (language: string, types?: string) => {
  if (types) {
    const libUri = 'ts:filename/index.d.ts'

    monaco.languages.typescript.javascriptDefaults.addExtraLib(types, libUri)
    monaco.editor.createModel(types, language, monaco.Uri.parse(libUri))
  }
}
